package db

import "database/sql"

type File struct {
	Key        []byte       `gorm:"column:key;primary_key;type:bytes;size:500;NOT NULL;comment:对象key" json:"key"`
	Hash       []byte       `gorm:"column:hash;type:bytes;size:100;NOT NULL;comment:对象hash" json:"hash"`
	ExpireTime sql.NullTime `gorm:"column:expire_time;comment:过期时间" json:"expire_time"`
	Size       int64        `gorm:"column:size;size:8;NOT NULL;default:0;comment:文件大小" json:"size"`
	Status     uint8        `gorm:"column:status;size:1;NOT NULL;default:0;comment:状态" json:"status"`
}
